<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>成功云平台</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
    <script>
        !(function(win, doc){
            function setFontSize() {
                var pr = window.devicePixelRatio
                var winWidth =  window.innerWidth;
                var size = 100;
                if(winWidth <=750){
                    size = 50 * pr;
                }
                // else if(winWidth >=1300){
                //     size = 120 * pr;
                // }
                else {
                    size = (winWidth / 1300)*100
                }
                doc.documentElement.style.fontSize = size + 'px' ;
            }
        
            var evt = 'onorientationchange' in win ? 'orientationchange' : 'resize';
            
            var timer = null;
        
            win.addEventListener(evt, function () {
                clearTimeout(timer);
        
                timer = setTimeout(setFontSize, 300);
            }, false);
            
            win.addEventListener("pageshow", function(e) {
                if (e.persisted) {
                    clearTimeout(timer);
                    //此处给定时器来实现页面加载完毕之后在进行字体设置
                    timer = setTimeout(setFontSize, 300);
                }
            }, false);
        
            // 初始化
            setFontSize();
        }(window, document));
    </script>
</head>
<body>
    <div id="Success"></div>
</body>
</html>